package cn.yunhe.model;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

public class Street implements Serializable {
    private int sid;
    private String sname;
    private District district;
    private Set<House>houseSet=new HashSet<>();

    public Street() {
    }

    public Street(int sid) {
        this.sid = sid;
    }

    public Street(String sname, District district) {
        this.sname = sname;
        this.district = district;
    }

    public Street(int sid, String sname, District district) {
        this.sid = sid;
        this.sname = sname;
        this.district = district;
    }

    public int getSid() {
        return sid;
    }

    public void setSid(int sid) {
        this.sid = sid;
    }

    public String getSname() {
        return sname;
    }

    public void setSname(String sname) {
        this.sname = sname;
    }

    public District getDistrict() {
        if (district==null)
            district=new District();
        return district;
    }

    public void setDistrict(District district) {
        this.district = district;
    }

    public Set<House> getHouseSet() {
        return houseSet;
    }

    public void setHouseSet(Set<House> houseSet) {
        this.houseSet = houseSet;
    }
}
